<template>
   <div class="add_user_form">
    <div class="data_title"><i class="iconfont icon-shujukanban"></i><h2>用户添加</h2></div>
    <el-form ref="formRef" :model="form" label-position="right" label-width="100px">
        <el-form-item label="登录名">
           <el-input v-model="form.name" placeholder="Please input"></el-input>
        </el-form-item>
        <el-form-item label="用户名">
           <el-input v-model="form.name" placeholder="Please input"></el-input>
        </el-form-item>
        <el-form-item label="输入密码">
          <el-input v-model="form.name" placeholder="Please input"></el-input>
        </el-form-item>
        <el-form-item label="确认密码">
           <el-input v-model="form.name" placeholder="Please input"></el-input>
        </el-form-item>
        <el-form-item label="备注">
           <el-input v-model="form.name" placeholder="Please input"></el-input>
        </el-form-item>
        <el-form-item>
           <el-button type="primary" @click="onSubmit" :icon="Select">添加</el-button>
           <el-button type="primary" @click="onSubmit" :icon="Close">取消</el-button>
        </el-form-item>
    </el-form>
  </div>
</template>

<script setup>
import { reactive } from 'vue'
import {Select,Close} from '@element-plus/icons-vue'
import router from '@/route';
// do not use same name with ref
const form = reactive({
  name: '',
  region: '',
  date1: '',
  date2: '',
  delivery: false,
  type: [],
  resource: '',
  desc: '',
})

const onSubmit = () => {
  alert('添加成功!')
  router.push("/")
}
</script>

<style>
.add_user_form{
  width: 450px;
}

/* .data_title i{
  float: left;
  margin-right: 10px;
  font-size: 20px;
  line-height: 30px;
  color: #605144!important;
}

.data_title{
  height: 35px;
  width: 60%;
  border-bottom: 2px solid #d0c1b1;
  margin-bottom: 50px;
}

.data_title h2{
  color: #605144!important;
  font-size: 18px;
  line-height: 30px;
  font-weight: 400;
} */
</style>